package com.sailfish.springbootdemo.dao.db5;

import com.sailfish.springbootdemo.common.DB5TableName;
import com.sailfish.springbootdemo.pojo.db5.EmpTAdmpAdgroup;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface EmpTAdmpAdgroupDao {

    /**
     * 根据 group_name 查询
     */
    @Select("select * from " + DB5TableName.EMP_T_ADMP_ADGROUP + " where group_name = #{group_name} limit 1")
    EmpTAdmpAdgroup getByGroupName(@Param("group_name")String group_name);

    /**
     * 根据 member 查询，模糊匹配
     */
    @Select("select * from " + DB5TableName.EMP_T_ADMP_ADGROUP + " where member like CONCAT('%',#{member},'%')")
    List<EmpTAdmpAdgroup> getByMember(@Param("member")String member);
}
